<template>
    <Panel title="众筹新品" :class="$style.panel">
        <section :class="$style.content">
            <router-link :to="{ name: 'home'}">
                <div :class="$style.arrow">更多尖货</div>
            </router-link>
            <Slider :options="options" :items="items" cname="product-slider"/>
        </section>
    </Panel>
</template>
<script>
import Panel from "../core/panel.vue"
import Slider from "../core/slider.vue"
import { itemsProuctJson } from "./store"

export default {
    components: {
        Panel,
        Slider,
    },
    data() {
        return {
            items: itemsProuctJson,
            options: {
                slidesPerView: 2.3,
                spaceBetween: 30,
                freeMode: true,
            },
        }
    },
}
</script>
<style lang="scss">
.product-slider{
  .swiper-container{
    box-sizing: border-box;
    padding: 0 24px;
    .swiper-slide{
      a{
        display: inline-block;
        width: 100%;
        img{
          width: 100%;
          display: block;
          height: 314px;
          border: 1px solid #fafafa;
        }
      }
    }
  }
}
</style>
<style lang="scss" module>
@import '../../css/element.scss';
.panel{
  @include panel;
  .content{
    padding-bottom: 40px;
    position: relative;
  }
  .arrow{
    position: absolute;
    font-size: 28px;
    color: #999;
    right: 20px;
    top:-70px;
  }
}
</style>
